package com.ncsc.lmis.model;
// Generated Feb 25, 2014 11:44:39 PM by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * SaleConditionTypeOrgAllow generated by hbm2java
 */
@Entity
@Table(name="sale_condition_type_org_allow"
    ,catalog="lmis"
)
public class SaleConditionTypeOrgAllow  implements java.io.Serializable {


     private SaleConditionTypeOrgAllowId id;
     private SaleConditionType saleConditionType;
     private Date allowBeginDtm;
     private Date allowEndDtm;
     private Short statusIsActive;
     private short statusIsAutoExtendAllowEndDtm;

    public SaleConditionTypeOrgAllow() {
    }

	
    public SaleConditionTypeOrgAllow(SaleConditionTypeOrgAllowId id, SaleConditionType saleConditionType, short statusIsAutoExtendAllowEndDtm) {
        this.id = id;
        this.saleConditionType = saleConditionType;
        this.statusIsAutoExtendAllowEndDtm = statusIsAutoExtendAllowEndDtm;
    }
    public SaleConditionTypeOrgAllow(SaleConditionTypeOrgAllowId id, SaleConditionType saleConditionType, Date allowBeginDtm, Date allowEndDtm, Short statusIsActive, short statusIsAutoExtendAllowEndDtm) {
       this.id = id;
       this.saleConditionType = saleConditionType;
       this.allowBeginDtm = allowBeginDtm;
       this.allowEndDtm = allowEndDtm;
       this.statusIsActive = statusIsActive;
       this.statusIsAutoExtendAllowEndDtm = statusIsAutoExtendAllowEndDtm;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="saleContTypeNo", column=@Column(name="SALE_CONT_TYPE_NO", nullable=false) ), 
        @AttributeOverride(name="orgNo", column=@Column(name="ORG_NO", nullable=false) ) } )
    public SaleConditionTypeOrgAllowId getId() {
        return this.id;
    }
    
    public void setId(SaleConditionTypeOrgAllowId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="SALE_CONT_TYPE_NO", nullable=false, insertable=false, updatable=false)
    public SaleConditionType getSaleConditionType() {
        return this.saleConditionType;
    }
    
    public void setSaleConditionType(SaleConditionType saleConditionType) {
        this.saleConditionType = saleConditionType;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="ALLOW_BEGIN_DTM", length=19)
    public Date getAllowBeginDtm() {
        return this.allowBeginDtm;
    }
    
    public void setAllowBeginDtm(Date allowBeginDtm) {
        this.allowBeginDtm = allowBeginDtm;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="ALLOW_END_DTM", length=19)
    public Date getAllowEndDtm() {
        return this.allowEndDtm;
    }
    
    public void setAllowEndDtm(Date allowEndDtm) {
        this.allowEndDtm = allowEndDtm;
    }

    
    @Column(name="STATUS_IS_ACTIVE")
    public Short getStatusIsActive() {
        return this.statusIsActive;
    }
    
    public void setStatusIsActive(Short statusIsActive) {
        this.statusIsActive = statusIsActive;
    }

    
    @Column(name="STATUS_IS_AUTO_EXTEND_ALLOW_END_DTM", nullable=false)
    public short getStatusIsAutoExtendAllowEndDtm() {
        return this.statusIsAutoExtendAllowEndDtm;
    }
    
    public void setStatusIsAutoExtendAllowEndDtm(short statusIsAutoExtendAllowEndDtm) {
        this.statusIsAutoExtendAllowEndDtm = statusIsAutoExtendAllowEndDtm;
    }




}


